<template>
  <div id="app">
      <!-- 此处是为添加了keepAlive=true 的路由添加缓存 -->
     <keep-alive>
        <router-view v-if="$route.meta.keepAlive"/>   
     </keep-alive>
 
      <!-- 此处是为添加了keepAlive=false 的路由默认不缓存 -->
      <router-view v-if="!$route.meta.keepAlive"/>   

  </div>
</template>

<script>
export default {
  created(){
    this.$store.commit('INIT_USER')
  }
}
</script>

<style>

</style>
